package com.yang.studentsapp;

import com.yang.studentsapp.model.IActionSuccess;
import com.yang.studentsapp.model.ModelSociety;
import com.yang.studentsapp.presenter.IView;
import com.yang.studentsapp.presenter.IViewSuccess;

import java.util.List;

/**
 * Created by ${Ян-Вэнь-Чао} on 2016/10/13.
 */
public class PresenterSociety extends  PresenterBase{
    private ModelSociety mModelSociety;
    public PresenterSociety(IView IView) {
        super(IView);
        mModelSociety = new ModelSociety(new MyAction());
    }

    public void getSocietyNews(final IViewSuccess<List<CampusSociety>> iViewSuccess){

        mModelSociety.getSocietyNews(new IActionSuccess<List<CampusSociety>>() {
            @Override
            public void succes(List<CampusSociety> data) {
                iViewSuccess.onSuccess(data);
            }
        });
    }

}
